<script>
	export default {
		onLaunch: function() {
			uni.getSystemInfo({
				success: function(e) {
					let height = e.windowHeight - uni.upx2px(155)
					Vue.prototype.swiperHeight = height
					console.log("可用高度为" + Vue.prototype.swiperHeight + "rpx")
					let width = e.windowWidth
					Vue.prototype.swiperWidth = width
					console.log("可用宽度为" + Vue.prototype.swiperWidth + "rpx")
					// let urlPath = "http://120.78.222.228:7878/club"
					// let urlPath = "http://172.25.152.24:8888/club"
					let urlPath = "http://192.168.1.154:8888/club"
					// let urlPath = "http://172.25.152.24:8888/club"
					let url = {
						banner:{
							getBanner:urlPath+"/banner/getBanner",//{num}
						},
						movement: {
							list: urlPath + "/movement/list",
							info: urlPath + "/movement/info",
							saveMovement:urlPath+"/movement/saveMovement",
							orderList: urlPath + "/movement/orderList", ///{page}/{rows}/{order}
							getOneClubAllActivity:urlPath+"/movement/getOneClubAllActivity",
							getOneClubUnderwayActivity:urlPath+"/movement/getOneClubUnderwayActivity",
							getOneClubNoUnderwayActivity:urlPath+"/movement/getOneClubNoUnderwayActivity",
							getAllLegalData:urlPath+"/movement/getAllLegalData",
							deleteById:urlPath+"/movement/deleteById",
							getAllLegalDataByScore:urlPath+"/movement/getAllLegalDataByScore",
							searchActivity:urlPath+"/movement/searchActivity",//{searchValue}
						},
						user: {
							login: urlPath + "/user/login",
							save: urlPath + "/user/save",
							update: urlPath + "/user/update",
						},
						comment: {
							save: urlPath + "/comment/save",
							getCommentByMovementId: urlPath + "/comment/movementid"
						},
						usermovement: {
							// 保存一个用户活动关系绑定
							save: urlPath + "/usermovement/save",
							// 得到用户与活动关系绑定，用于判断用户是否参与活动
							judgeUserMovementIsEmpty: urlPath +
								"/usermovement/judgeUserMovementIsEmpty",
							getOneUserAllMovement: urlPath +"/usermovement/getOneUserAllMovement", //{userId}
							dropout: urlPath +"/usermovement/dropout", ///{userid}/{movementid}
						},
						club: {
							info:urlPath + "/club/info",//{id}
							// 全部社团数据
							list: urlPath + "/club/list",
							// 热点社团数据，发布活动数量前8名
							hotClubList: urlPath + "/club/hotClubList",
							// 注销社团
							logoutClub: urlPath + "/club/logoutClub",
							//得到一个用户的全部社团
							getOneUserClubs: urlPath + "/club/getOneUserClubs", ///{userId}
							getOneUserAdminClubs: urlPath + "/club/getOneUserAdminClubs", //{userId}
							saveClub: urlPath + "/club/saveClub", //{userId}
							registerAClub:urlPath + "/club/registerAClub",//申请一个社团{userId}
						},
						userclub: {
							getOneClubAllUsers: urlPath + "/userclub/getOneClubAllUsers", //{clubId}
							getOneUserAllClubs: urlPath + "/userclub/getOneUserAllClubs", //{userId}
							getOneUserClub: urlPath + "/userclub/getOneUserClub", ///{userId}/{clubId}
							// 退出社团
							exitClub: urlPath + "/userclub/exitClub", ///{userId}/{clubId}
							save: urlPath + "/userclub/save",
							getOneUserAdminUserClubs:urlPath+"/userclub/getOneUserAdminUserClubs",
							getOneClubApplyUser:urlPath+"/userclub/getOneClubApplyUser",
							update:urlPath+"/userclub/update"
						},
						file:{
							upload:urlPath+"/file/upload"
						},
						university:{
							getAllUniversity:urlPath+"/university/getAllUniversity"
						},
						top:{
							getJiugongge:urlPath + "/top/getJiugongge",//得到九宫格数据
						}
					}
					Vue.prototype.url = url
				}
			})

		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* 引入colorui的内容 */
	@import "colorui/main.css";
	@import "colorui/icon.css";
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
</style>
